using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

namespace GUI
{
    public partial class CacheManager : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }

        protected void btLogin_Clicked(object sender, EventArgs e)
        {
            if (txtPassword.Text == "123")
            {
                phLoggedIn.Visible = true;
                phNotLoggedIn.Visible = false;
            }
        }

        protected void btView_Clicked(object sender, EventArgs e)
        {
            object cacheobject = Cache.Get(txtCacheName.Text);
            if (cacheobject != null)
            {
                txtContent.Text = cacheobject.ToString();
            }
        }

        protected void btDelete_Clicked(object sender, EventArgs e)
        {
            Cache.Remove(txtCacheName.Text);
            txtContent.Text = String.Empty;
        }
    }
}
